<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

	<title>UG</title>

	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
	<script type="text/javascript" src="http://ugsilverlight.googlecode.com/svn/ug/silverlight.js"></script>
	<script type="text/javascript" src="http://ugsilverlight.googlecode.com/svn/ug/wmvplayer.js"></script>

	<script type="text/javascript">

		$(document).ready(function()
		{
			var sBookmarklet = "javascript:void(_s=document.createElement('script'), _s.src='http://ugsilverlight.googlecode.com/svn/ug/ug_newscreen.js', document.body.appendChild(_s))";
			$('input#bookmarklet').val(sBookmarklet);
		});

		function setStream(sUrl)
		{
			if (typeof(sUrl) == 'undefined' || sUrl == '')
			{
				return;
			}
			else if (sUrl.indexOf('streamurl=') > 0)
			{
				sUrl = sUrl.split('streamurl=')[1];
				var sHtml = '<embed src="'+sUrl+'" height="556" width="990" autoplay="true" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/">';

				$('div#wmv-player').html(sHtml);
			}
			else
			{
				var cnt = document.getElementById('wmv-player');
				var src = 'wmvplayer.xaml';
				cfg = {
					file: sUrl,
					autostart: 'true',
					width:'990',
					height:'556'
				};

				var ply = new jeroenwijering.Player(cnt,src,cfg);
			}
		}

	</script>

	<style type="text/css">

	body {
		background: #809DD6; 
		text-align: center;
		font-family: Verdana;
	}

	div#container {
		width: 990px;
		margin: 0 auto;
	}

	div#streams {
		padding: 5px 0;
		background: #e4e7ee;
	}

	div#streams a {
		color: black;
		font-size: 14px;
		font-weight: bold;
		margin: 0 10px;
	}

	iframe {
		display: none !important;
	}

	input {
		text-align: center;
	}

	</style>

</head>
<body>

	<div id="container">
	
		<img src="http://u.uitzendinggemist.nl/pics/bg.header.new.png" alt="" />
	
		<div id="streams"></div>
	
		<div id="wmv-player"></div>

		<p><small>Bookmarklet:</small></p>
		<input type="text" id="bookmarklet" size="110" readonly="readonly" value="" />

	</div>

	<script type="text/javascript">

		var sArgs = unescape(location.href.split('?url=')[1]);

		if (sArgs != 'undefined')
		{
			var aTmp = sArgs.split('|');
			var aStreams = {};

			for (i in aTmp)
			{
				var aProp = aTmp[i].split('@');
				$('div#streams').append('<a href="javascript:setStream(\''+aProp[1]+'\')">'+aProp[0]+'</a> ');
			}
		
			setStream(aTmp[0].split('@')[1]);
		}

	</script>


</body>
</html>